<!DOCTYPE html>
<html>
  <head>
  <meta charset='UTF-8'>
  <title>Atom API Documentation</title>
  <link rel='stylesheet' href='../assets/biscotto.css' type='text/css'>
  <script src='../assets/biscotto.js'></script>
  <script src='../assets/search_data.js'></script>
</head>
  <body>
    <div id='base' data-path='..&#47;'></div>
<div id='header'>
  <div id='menu'>
    <a href='../docs/README.md.html' title='Atom'>Atom</a>
    &raquo;
    <a href='../class_index.html' title='Index'>Index</a>
    &raquo;
    <span class='title'>Selection</span>
    <nav>
      <ul>
        <li class='noframes'>
          (<a class='noframes' href='Selection.html#'>no frames</a>)
        </li>
      </ul>
    </nav>
    <div id='search'>
      <a id='class_list_link' href='../class_list.html'>Classes</a>
      <a id='file_list_link' href='../file_list.html'>Files</a>
      <a id='method_list_link' href='../method_list.html'>Methods</a>
      <a id='extra_list_link' href='../extra_list.html'>Extras</a>
    </div>
  </div>
  <iframe id='search_frame'></iframe>
  <div id='fuzzySearch'>
    <input type='text'>
    <ol></ol>
  </div>
  <div id='help'>
    <p>
      Quickly fuzzy find classes, mixins, methods, file:
    </p>
    <ul>
      <li>
        <span>Ctrl-T</span>
        Open fuzzy finder dialog
      </li>
    </ul>
    <p>
      In frame mode you can toggle the list naviation frame on the left side:
    </p>
    <ul>
      <li>
        <span>Ctrl-L</span>
        Toggle list view
      </li>
    </ul>
    <p>
      You can focus a list in frame mode or toggle a tab in frameless mode:
    </p>
    <ul>
      <li>
        <span>Ctrl-C</span>
        Class list
      </li>
      <li>
        <span>Ctrl-I</span>
        Mixin list
      </li>
      <li>
        <span>Ctrl-F</span>
        File list
      </li>
      <li>
        <span>Ctrl-M</span>
        Method list
      </li>
      <li>
        <span>Ctrl-E</span>
        Extras list
      </li>
    </ul>
    <p>
      You can focus and blur the search input:
    </p>
    <ul>
      <li>
        <span>Ctrl-S</span>
        Focus search input
      </li>
      <li>
        <span>Esc</span>
        Blur search input
      </li>
    </ul>
    <p>
      In frameless mode you can close the list tab:
    </p>
    <ul>
      <li>
        <span>Esc</span>
        Close list tab
      </li>
    </ul>
  </div>
</div>
    <div id='content'>
      <h1>
        Class
        Selection
      </h1>
      <div class='stability-1'>
        <span class='heading'></span>
        <div class='message'></div>
      </div>
      <table class='box'>
        <tr>
          <td>Defined in:</td>
          <td>src&#47;selection.coffee</td>
        </tr>
      </table>
      <h2>Overview</h2>
      <div class='docstring'>
  <p>Represents a selection in the <a href='Editor.html'>Editor</a>.</p>
</div>
<div class='tags'>
</div>
      <h2>Instance Method Summary</h2>
      <ul class='summary'>
  <li>
    <span class='signature'>
      <a href='Selection.html#addSelectionAbove-instance'>
        ::<strong>addSelectionAbove</strong>()
      </a>
    </span>
    <span class='desc'>
      Moves the selection up one row.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#addSelectionBelow-instance'>
        ::<strong>addSelectionBelow</strong>()
      </a>
    </span>
    <span class='desc'>
      Moves the selection down one row.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#autoIndentSelectedRows-instance'>
        ::<strong>autoIndentSelectedRows</strong>()
      </a>
    </span>
    <span class='desc'>
      Sets the indentation level of all selected rows to values suggested by the relevant grammars.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#backspace-instance'>
        ::<strong>backspace</strong>()
      </a>
    </span>
    <span class='desc'>
      Removes the first character before the selection if the selection is empty otherwise it deletes the selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#backspaceToBeginningOfLine-instance'>
        ::<strong>backspaceToBeginningOfLine</strong>()
      </a>
    </span>
    <span class='desc'>
      Removes from the beginning of the line which the selection begins on all the way through to the end of the selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#backspaceToBeginningOfWord-instance'>
        ::<strong>backspaceToBeginningOfWord</strong>()
      </a>
    </span>
    <span class='desc'>
      Removes from the start of the selection to the beginning of the current word if the selection is empty otherwise it deletes the selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#clear-instance'>
        ::<strong>clear</strong>()
      </a>
    </span>
    <span class='desc'>
      Clears the selection, moving the marker to the head.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#compare-instance'>
        ::<strong>compare</strong>(otherSelection)
      </a>
    </span>
    <span class='desc'>
      Compare this selection&#39;s buffer range to another selection&#39;s buffer range.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#copy-instance'>
        ::<strong>copy</strong>(maintainClipboard = false)
      </a>
    </span>
    <span class='desc'>
      Copies the current selection to the clipboard.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#cut-instance'>
        ::<strong>cut</strong>(maintainClipboard = false)
      </a>
    </span>
    <span class='desc'>
      Copies the selection to the clipboard and then deletes it.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#cutToEndOfLine-instance'>
        ::<strong>cutToEndOfLine</strong>(maintainClipboard)
      </a>
    </span>
    <span class='desc'>
      Cuts the selection until the end of the line.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#delete-instance'>
        ::<strong>delete</strong>()
      </a>
    </span>
    <span class='desc'>
      Removes the selection or the next character after the start of the selection if the selection is empty.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#deleteLine-instance'>
        ::<strong>deleteLine</strong>()
      </a>
    </span>
    <span class='desc'>
      Removes the line at the beginning of the selection if the selection is empty unless the selection spans multiple lines in which case all lines are removed.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#deleteSelectedText-instance'>
        ::<strong>deleteSelectedText</strong>()
      </a>
    </span>
    <span class='desc'>
      Removes only the selected text.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#deleteToEndOfWord-instance'>
        ::<strong>deleteToEndOfWord</strong>()
      </a>
    </span>
    <span class='desc'>
      Removes the selection or all characters from the start of the selection to the end of the current word if nothing is selected.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#expandOverLine-instance'>
        ::<strong>expandOverLine</strong>()
      </a>
    </span>
    <span class='desc'>
      Expands the newest selection to include the entire line on which the cursor currently rests.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#expandOverWord-instance'>
        ::<strong>expandOverWord</strong>()
      </a>
    </span>
    <span class='desc'>
      Expands the newest selection to include the entire word on which the cursors rests.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#fold-instance'>
        ::<strong>fold</strong>()
      </a>
    </span>
    <span class='desc'>
      Creates a fold containing the current selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#getBufferRange-instance'>
        ::<strong>getBufferRange</strong>()
      </a>
    </span>
    <span class='desc'>
      Returns the buffer <a href='Range.html'>Range</a> for the selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#getBufferRowRange-instance'>
        Array ::<strong>getBufferRowRange</strong>()
      </a>
    </span>
    <span class='desc'>
      Returns the starting and ending buffer rows the selection is highlighting.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#getScreenRange-instance'>
        ::<strong>getScreenRange</strong>()
      </a>
    </span>
    <span class='desc'>
      Returns the screen <a href='Range.html'>Range</a> for the selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#getText-instance'>
        ::<strong>getText</strong>()
      </a>
    </span>
    <span class='desc'>
      Returns the text in the selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#indentSelectedRows-instance'>
        ::<strong>indentSelectedRows</strong>()
      </a>
    </span>
    <span class='desc'>
      If the selection spans multiple rows, indent all of them.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#insertText-instance'>
        ::<strong>insertText</strong>(text, options = {})
      </a>
    </span>
    <span class='desc'>
      Replaces text at the current selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#intersectsBufferRange-instance'>
        ::<strong>intersectsBufferRange</strong>(bufferRange)
      </a>
    </span>
    <span class='desc'>
      Identifies if a selection intersects with a given buffer range.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#intersectsWith-instance'>
        ::<strong>intersectsWith</strong>(otherSelection)
      </a>
    </span>
    <span class='desc'>
      Identifies if a selection intersects with another selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#isEmpty-instance'>
        ::<strong>isEmpty</strong>()
      </a>
    </span>
    <span class='desc'>
      Determines if the selection contains anything.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#isReversed-instance'>
        ::<strong>isReversed</strong>()
      </a>
    </span>
    <span class='desc'>
      Determines if the ending position of a marker is greater than the starting position.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#isSingleScreenLine-instance'>
        ::<strong>isSingleScreenLine</strong>()
      </a>
    </span>
    <span class='desc'>
      Returns whether the selection is a single line or not.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#joinLines-instance'>
        ::<strong>joinLines</strong>()
      </a>
    </span>
    <span class='desc'>
      Joins the current line with the one below it.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#merge-instance'>
        ::<strong>merge</strong>(otherSelection, options)
      </a>
    </span>
    <span class='desc'>
      Combines the given selection into this selection and then destroys the given selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#normalizeIndents-instance'>
        ::<strong>normalizeIndents</strong>(text, indentBasis)
      </a>
    </span>
    <span class='desc'>
      Indents the given text to the suggested level based on the grammar.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#outdentSelectedRows-instance'>
        ::<strong>outdentSelectedRows</strong>()
      </a>
    </span>
    <span class='desc'>
      Removes one level of indent from the currently selected rows.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectAll-instance'>
        ::<strong>selectAll</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects all the text in the buffer.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectDown-instance'>
        ::<strong>selectDown</strong>(rowCount)
      </a>
    </span>
    <span class='desc'>
      Selects all the text one position below the cursor.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectLeft-instance'>
        ::<strong>selectLeft</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects the text one position left of the cursor.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectLine-instance'>
        ::<strong>selectLine</strong>(row)
      </a>
    </span>
    <span class='desc'>
      Selects an entire line in the buffer.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectRight-instance'>
        ::<strong>selectRight</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects the text one position right of the cursor.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToBeginningOfLine-instance'>
        ::<strong>selectToBeginningOfLine</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects all the text from the current cursor position to the beginning of the line.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToBeginningOfNextWord-instance'>
        ::<strong>selectToBeginningOfNextWord</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects all the text from the current cursor position to the beginning of the next word.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToBeginningOfWord-instance'>
        ::<strong>selectToBeginningOfWord</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects all the text from the current cursor position to the beginning of the word.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToBottom-instance'>
        ::<strong>selectToBottom</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects all the text from the current cursor position to the bottom of the buffer.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToBufferPosition-instance'>
        ::<strong>selectToBufferPosition</strong>(position)
      </a>
    </span>
    <span class='desc'>
      Selects the text from the current cursor position to a given buffer position.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToEndOfLine-instance'>
        ::<strong>selectToEndOfLine</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects all the text from the current cursor position to the end of the line.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToEndOfWord-instance'>
        ::<strong>selectToEndOfWord</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects all the text from the current cursor position to the end of the word.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToFirstCharacterOfLine-instance'>
        ::<strong>selectToFirstCharacterOfLine</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects all the text from the current cursor position to the first character of the line.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToNextWordBoundary-instance'>
        ::<strong>selectToNextWordBoundary</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects text to the next word boundary.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToPreviousWordBoundary-instance'>
        ::<strong>selectToPreviousWordBoundary</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects text to the previous word boundary.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToScreenPosition-instance'>
        ::<strong>selectToScreenPosition</strong>(position)
      </a>
    </span>
    <span class='desc'>
      Selects the text from the current cursor position to a given screen position.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectToTop-instance'>
        ::<strong>selectToTop</strong>()
      </a>
    </span>
    <span class='desc'>
      Selects all the text from the current cursor position to the top of the buffer.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectUp-instance'>
        ::<strong>selectUp</strong>(rowCount)
      </a>
    </span>
    <span class='desc'>
      Selects all the text one position above the cursor.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#selectWord-instance'>
        Range ::<strong>selectWord</strong>()
      </a>
    </span>
    <span class='desc'>
      Modifies the selection to encompass the current word.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#setBufferRange-instance'>
        ::<strong>setBufferRange</strong>(bufferRange, options = {})
      </a>
    </span>
    <span class='desc'>
      Modifies the buffer <a href='Range.html'>Range</a> for the selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#setIndentationForLine-instance'>
        ::<strong>setIndentationForLine</strong>(line, indentLevel)
      </a>
    </span>
    <span class='desc'>
      ?
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#setScreenRange-instance'>
        ::<strong>setScreenRange</strong>(screenRange, options)
      </a>
    </span>
    <span class='desc'>
      Modifies the screen range for the selection.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Selection.html#toggleLineComments-instance'>
        Range ::<strong>toggleLineComments</strong>()
      </a>
    </span>
    <span class='desc'>
      Wraps the selected lines in comments if they aren&#39;t currently part of a comment.
    </span>
  </li>
</ul>
      <h2>Instance Method Details</h2>
      <div class='methods'>
  <div class='method_details'>
    <p class='signature' id='addSelectionAbove-instance'>
      ::<strong>addSelectionAbove</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Moves the selection up one row.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='addSelectionBelow-instance'>
      ::<strong>addSelectionBelow</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Moves the selection down one row.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='autoIndentSelectedRows-instance'>
      ::<strong>autoIndentSelectedRows</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Sets the indentation level of all selected rows to values suggested by the relevant grammars.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='backspace-instance'>
      ::<strong>backspace</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Removes the first character before the selection if the selection is empty otherwise it deletes the selection.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='backspaceToBeginningOfLine-instance'>
      ::<strong>backspaceToBeginningOfLine</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Removes from the beginning of the line which the selection begins on all the way through to the end of the selection.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='backspaceToBeginningOfWord-instance'>
      ::<strong>backspaceToBeginningOfWord</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Removes from the start of the selection to the beginning of the current word if the selection is empty otherwise it deletes the selection.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='clear-instance'>
      ::<strong>clear</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Clears the selection, moving the marker to the head.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='compare-instance'>
      ::<strong>compare</strong>(otherSelection)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Compare this selection&#39;s buffer range to another selection&#39;s buffer range.</p><p>See <a href='Range.html#compare-instance'>Range::compare</a> for more details.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(Selection)</span>
      <span class='name'>otherSelection</span>
      &mdash;
      <span class='desc'>A <a href='Selection.html'>Selection</a> to compare against.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='copy-instance'>
      ::<strong>copy</strong>(maintainClipboard = false)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Copies the current selection to the clipboard.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='cut-instance'>
      ::<strong>cut</strong>(maintainClipboard = false)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Copies the selection to the clipboard and then deletes it.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='cutToEndOfLine-instance'>
      ::<strong>cutToEndOfLine</strong>(maintainClipboard)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Cuts the selection until the end of the line.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='delete-instance'>
      ::<strong>delete</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Removes the selection or the next character after the start of the selection if the selection is empty.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='deleteLine-instance'>
      ::<strong>deleteLine</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Removes the line at the beginning of the selection if the selection is empty unless the selection spans multiple lines in which case all lines are removed.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='deleteSelectedText-instance'>
      ::<strong>deleteSelectedText</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Removes only the selected text.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='deleteToEndOfWord-instance'>
      ::<strong>deleteToEndOfWord</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Removes the selection or all characters from the start of the selection to the end of the current word if nothing is selected.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='expandOverLine-instance'>
      ::<strong>expandOverLine</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Expands the newest selection to include the entire line on which the cursor currently rests.</p><p>It also includes the newline character. </p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='expandOverWord-instance'>
      ::<strong>expandOverWord</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Expands the newest selection to include the entire word on which the cursors rests.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='fold-instance'>
      ::<strong>fold</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Creates a fold containing the current selection.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getBufferRange-instance'>
      ::<strong>getBufferRange</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns the buffer <a href='Range.html'>Range</a> for the selection.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getBufferRowRange-instance'>
      Array ::<strong>getBufferRowRange</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns the starting and ending buffer rows the selection is highlighting.</p>
</div>
<div class='tags'>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      (<tt>Array</tt>)
      &mdash;
      <span class='desc'>Returns an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array'>Array</a> of two <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number'>Number</a>s: the starting row, and the ending row.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getScreenRange-instance'>
      ::<strong>getScreenRange</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns the screen <a href='Range.html'>Range</a> for the selection.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getText-instance'>
      ::<strong>getText</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns the text in the selection.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='indentSelectedRows-instance'>
      ::<strong>indentSelectedRows</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>If the selection spans multiple rows, indent all of them.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='insertText-instance'>
      ::<strong>insertText</strong>(text, options = {})
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Replaces text at the current selection.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>text</span>
      &mdash;
      <span class='desc'>A <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> representing the text to add</span>
    </li>
    <li>
      <span class='type'>(Object)</span>
      <span class='name'>options</span>
      &mdash;
      <span class='desc'>An <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> with keys:</span>
    </li>
    <ul class='options'>
      <li>
        <span class='name'>select</span>
        &mdash;
        <span class='desc'>if <code>true</code>, selects the newly added text.</span>
      </li>
      <li>
        <span class='name'>autoIndent</span>
        &mdash;
        <span class='desc'>if <code>true</code>, indents all inserted text appropriately.</span>
      </li>
      <li>
        <span class='name'>autoIndentNewline</span>
        &mdash;
        <span class='desc'>if <code>true</code>, indent newline appropriately.</span>
      </li>
      <li>
        <span class='name'>autoDecreaseIndent</span>
        &mdash;
        <span class='desc'>if <code>true</code>, decreases indent level appropriately (for example, when a closing bracket is inserted).</span>
      </li>
      <li>
        <span class='name'>undo</span>
        &mdash;
        <span class='desc'>if <code>skip</code>, skips the undo stack for this operation.</span>
      </li>
    </ul>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='intersectsBufferRange-instance'>
      ::<strong>intersectsBufferRange</strong>(bufferRange)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Identifies if a selection intersects with a given buffer range.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(Range)</span>
      <span class='name'>bufferRange</span>
      &mdash;
      <span class='desc'>A <a href='Range.html'>Range</a> to check against.</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns a Boolean.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='intersectsWith-instance'>
      ::<strong>intersectsWith</strong>(otherSelection)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Identifies if a selection intersects with another selection.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(Selection)</span>
      <span class='name'>otherSelection</span>
      &mdash;
      <span class='desc'>A <a href='Selection.html'>Selection</a> to check against.</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns a Boolean.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='isEmpty-instance'>
      ::<strong>isEmpty</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Determines if the selection contains anything.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='isReversed-instance'>
      ::<strong>isReversed</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Determines if the ending position of a marker is greater than the starting position.</p><p>This can happen when, for example, you highlight text &quot;up&quot; in a <a href='TextBuffer.html'>TextBuffer</a>. </p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='isSingleScreenLine-instance'>
      ::<strong>isSingleScreenLine</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns whether the selection is a single line or not.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='joinLines-instance'>
      ::<strong>joinLines</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Joins the current line with the one below it.</p><p>If there selection spans more than one line, all the lines are joined together. </p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='merge-instance'>
      ::<strong>merge</strong>(otherSelection, options)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Combines the given selection into this selection and then destroys the given selection.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(Selection)</span>
      <span class='name'>otherSelection</span>
      &mdash;
      <span class='desc'>A <a href='Selection.html'>Selection</a> to merge with.</span>
    </li>
    <li>
      <span class='name'>options</span>
      &mdash;
      <span class='desc'>A hash of options matching those found in <a href='Selection.html#setBufferRange-instance'>::setBufferRange</a>.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='normalizeIndents-instance'>
      ::<strong>normalizeIndents</strong>(text, indentBasis)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Indents the given text to the suggested level based on the grammar.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>text</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> to indent within the selection.</span>
    </li>
    <li>
      <span class='name'>indentBasis</span>
      &mdash;
      <span class='desc'>The beginning indent level.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='outdentSelectedRows-instance'>
      ::<strong>outdentSelectedRows</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Removes one level of indent from the currently selected rows.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectAll-instance'>
      ::<strong>selectAll</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text in the buffer.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectDown-instance'>
      ::<strong>selectDown</strong>(rowCount)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text one position below the cursor.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectLeft-instance'>
      ::<strong>selectLeft</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects the text one position left of the cursor.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectLine-instance'>
      ::<strong>selectLine</strong>(row)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects an entire line in the buffer.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(Number)</span>
      <span class='name'>row</span>
      &mdash;
      <span class='desc'>The line <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number'>Number</a> to select (default: the row of the cursor).</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectRight-instance'>
      ::<strong>selectRight</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects the text one position right of the cursor.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToBeginningOfLine-instance'>
      ::<strong>selectToBeginningOfLine</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text from the current cursor position to the beginning of the line.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToBeginningOfNextWord-instance'>
      ::<strong>selectToBeginningOfNextWord</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text from the current cursor position to the beginning of the next word.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToBeginningOfWord-instance'>
      ::<strong>selectToBeginningOfWord</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text from the current cursor position to the beginning of the word.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToBottom-instance'>
      ::<strong>selectToBottom</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text from the current cursor position to the bottom of the buffer.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToBufferPosition-instance'>
      ::<strong>selectToBufferPosition</strong>(position)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects the text from the current cursor position to a given buffer position.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(Point)</span>
      <span class='name'>position</span>
      &mdash;
      <span class='desc'>An instance of <a href='Point.html'>Point</a>, with a given <code>row</code> and <code>column</code>.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToEndOfLine-instance'>
      ::<strong>selectToEndOfLine</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text from the current cursor position to the end of the line.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToEndOfWord-instance'>
      ::<strong>selectToEndOfWord</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text from the current cursor position to the end of the word.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToFirstCharacterOfLine-instance'>
      ::<strong>selectToFirstCharacterOfLine</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text from the current cursor position to the first character of the line.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToNextWordBoundary-instance'>
      ::<strong>selectToNextWordBoundary</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects text to the next word boundary.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToPreviousWordBoundary-instance'>
      ::<strong>selectToPreviousWordBoundary</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects text to the previous word boundary.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToScreenPosition-instance'>
      ::<strong>selectToScreenPosition</strong>(position)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects the text from the current cursor position to a given screen position.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(Point)</span>
      <span class='name'>position</span>
      &mdash;
      <span class='desc'>An instance of <a href='Point.html'>Point</a>, with a given <code>row</code> and <code>column</code>.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectToTop-instance'>
      ::<strong>selectToTop</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text from the current cursor position to the top of the buffer.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectUp-instance'>
      ::<strong>selectUp</strong>(rowCount)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Selects all the text one position above the cursor.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='selectWord-instance'>
      Range ::<strong>selectWord</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Modifies the selection to encompass the current word.</p>
</div>
<div class='tags'>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      (<tt><a href='Range.html'>Range</a></tt>)
      &mdash;
      <span class='desc'>Returns a <a href='Range.html'>Range</a>.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='setBufferRange-instance'>
      ::<strong>setBufferRange</strong>(bufferRange, options = {})
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Modifies the buffer <a href='Range.html'>Range</a> for the selection.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(Range)</span>
      <span class='name'>screenRange</span>
      &mdash;
      <span class='desc'>The new <a href='Range.html'>Range</a> to select.</span>
    </li>
    <li>
      <span class='type'>(Object)</span>
      <span class='name'>options</span>
      &mdash;
      <span class='desc'>An <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> with the keys:</span>
    </li>
    <ul class='options'>
      <li>
        <span class='name'>preserveFolds</span>
        &mdash;
        <span class='desc'>if <code>true</code>, the fold settings are preserved after the selection moves.</span>
      </li>
      <li>
        <span class='type'>(Editor)</span>
        <span class='name'>autoscroll</span>
        &mdash;
        <span class='desc'>if <code>true</code>, the <a href='Editor.html'>Editor</a> scrolls to the new selection.</span>
      </li>
    </ul>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='setIndentationForLine-instance'>
      ::<strong>setIndentationForLine</strong>(line, indentLevel)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>?</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='setScreenRange-instance'>
      ::<strong>setScreenRange</strong>(screenRange, options)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Modifies the screen range for the selection.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(Range)</span>
      <span class='name'>screenRange</span>
      &mdash;
      <span class='desc'>The new <a href='Range.html'>Range</a> to use.</span>
    </li>
    <li>
      <span class='name'>options</span>
      &mdash;
      <span class='desc'>A hash of options matching those found in <a href='Selection.html#setBufferRange-instance'>::setBufferRange</a>.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='toggleLineComments-instance'>
      Range ::<strong>toggleLineComments</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Wraps the selected lines in comments if they aren&#39;t currently part of a comment.</p><p>Removes the comment if they are currently wrapped in a comment.</p>
</div>
<div class='tags'>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      (<tt><a href='Range.html'>Range</a></tt>)
      &mdash;
      <span class='desc'>Returns an Array of the commented <a href='Range.html'>Range</a>s.</span>
    </li>
  </ul>
</div>
  </div>
</div>
    </div>
    <div id='footer'>
  Generated on
  Thu Mar 06 2014 17:48:26 GMT-0800 (PST)
  by
  <a href='https://github.com/gjtorikian/biscotto' title='TomDoc-CoffeeScript API documentation generator'>Biscotto</a>
  v2.1.1
  (Node.js v0.10.21).
  &#10034;
  Press Ctrl-h to see the keyboard shortcuts
</div>
  </body>
</html>